package com.liuhe.test2;

public class Test2 {
    public static void main(String[] args) {
        String str = "我是你你爹爹顶顶顶顶的点点滴滴大大大";
        String result  = str.replaceAll("(.)\\1*","$1");
        System.out.println(result);
    }
}
